package com.hmy.finance.api.bo.core.request.enums;

import lombok.Getter;

/**
 * 理赔单类型枚举
 *
 * @author songkf
 */

@Getter
public enum ClaimBillTypeEnum {
    /**
     * 1-进场单
     */
    ENTRY("1", "进场单"),
    /**
     * 2-出场单
     */
    EXIT("2", "退场单");
    private final String value;
    private final String desc;

    ClaimBillTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    /**
     * 根据value获取desc
     *
     * @param value value
     * @return desc
     * @author songkf
     */
    public static String getDescByValue(String value) {
        for (ProfitLossTypeEnum e : ProfitLossTypeEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getDesc();
            }
        }
        return null;
    }
}
